import { DeviceStateEnum } from '@/maps/device/DeviceStateEnum'
function genData() {
  let leftTime = 24 * 60
  const data = []

  for (let i = 0; i < 30; i++) {
    const itime = Math.random() * 60 * 2
    if (leftTime < itime) {
      continue
    }
    data.push({
      timeDuring: itime,
      color: DeviceStateEnum.getDefaultValue(
        'color',
        Number.parseInt(String(Math.random() * 5)) + 1
      ),
    })
    leftTime -= itime
  }

  return data
}
export const runtimeData = genData()
